package ${package}.${moduleName}.entity.bo;

import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.Size;
import jakarta.validation.constraints.NotNull;
import java.io.Serial;
import lombok.Data;
import lombok.EqualsAndHashCode;
import io.github.linpeilie.annotations.AutoMapper;
import ${package}.${moduleName}.entity.${ClassName};
<#list importList as i>
import ${i!};
</#list>
<#if baseClass??>
import com.sxpcwlkj.framework.entity.${baseClass.code};
</#if>

/**
* ${tableComment}
*
* @author ${author} ${email}
* @since ${version} ${date}
*/
<#if baseClass??>@EqualsAndHashCode(callSuper=false)</#if>
@Data
@AutoMapper(target = ${ClassName}.class)
public class ${ClassName}Bo <#if baseClass??> extends ${baseClass.code}</#if> {
	@Serial
	private static final long serialVersionUID = 1L;
<#list fieldList as field>
<#if !field.baseField>
	<#if field.fieldComment!?length gt 0>
	/**
	 * ${field.fieldComment}
	 */
	<#if field.attrType=='String'>
	@NotBlank(message = "${field.fieldComment}不能为空")
	<#else>
	@NotNull(message = "${field.fieldComment}不能为空")
	</#if>
</#if>
<#if field.queryFormType == 'date'>
	@DateTimeFormat(pattern="yyyy-MM-dd")
<#elseif field.queryFormType == 'datetime'>
	@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
</#if>
	private ${field.attrType}<#if field.queryFormType == 'date' || field.queryFormType == 'datetime'>[]</#if> ${field.attrName};

</#if>
</#list>
}
